/**
 *
 */
Ext.define('vacake.view.Category', {
    extend: 'Ext.Container',
    xtype: 'categoryView',
    config: {
        layout: 'vbox',
        items: [
             {
                xtype: 'titlebar',
                docked: 'top',
                  title: '分类'
            },
            {
                xtype: 'list',
                emptyText: '<div style="width: 100%; height: 100%; text-align: center; vertical-align: middle">' +
                    '<img width="94" height="94" src="resources/images/null.png"  style="margin-top:100px;"   /> ' +
                    '<div class="height30 color2 font2">暂时没有产品的分类</div>' +
                    '</div>',
                id: 'class_data_view',
                store: 'Category',
                style: "margin:16px 5px",
                selectedCls:false,
                pressedCls:false,
                cls:'x-list10',
                onItemDisclosure: true,
                flex:1,
                itemTpl:
                    "<div style='height:72px; position: relative;padding: 5px' class='shoppingEdit_bg shadow radius3' >" +
                        "<div style='position: absolute; left: -5px; bottom: -5px;'><img src='resources/images/shadow_left.png' width='5' height='71' /></div>" +
                        "<div style='position: absolute; right: -5px; bottom: -5px;'><img src='resources/images/shadow_right.png' width='5' height='71' /></div>" +
                        "<div style='position: absolute; top:-6px; right: -6px;'></div>"+
                        "<img  src='{iconUrl}' style='float: left;height: 62px;width: 62px' class='radius'/> " +
                        "<div class='homelist_name height30 color2 font5' style='line-height: 62px; height: 62px;'>{name}</div>" +
                        "</div>"
            }
        ],
        listeners: { 
            painted:function(){
                  var category = Ext.getStore('Category');
                if (category.find('cadid', window.localStorage.getItem('app_district_id')) == -1) {
                    category.load({params: {cadid: window.localStorage.getItem('app_district_id')}});
                }
                Ext.Viewport.unmask();
            }
        }
    }
});

